]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Do not try to animate a St.Adjustment with unmapped actor
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 4 Dec 2025 04:18:04 +0000 (05:18 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Jan 2026 18:06:31 +0000 (19:06 +0100)
We were already doing this for actual actors, but the case was
skipped in the St.Adjustment case.

However, as it is an animatable we can just use its related actor as
reference, and keep the same logic despite their actual object type

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3991>
(cherry picked from commit 4d56b51100df05032ee78c5fa556b4e003de2761)

js/ui/environment.js

index f3b461ca6b2344b91761b21d85b8c28119c58106..8cf764e95742442e7715f88991b91b5700e6b7b5 100644 (file)
@@ -197,9 +197,12 @@ function _easeAnimatableProperty(animatable, propName, target, params) {
     // whether the transition should finish where it started
     const isReversed = autoReverse && numIterations % 2 === 0;
 
+    // The object is a Clutter.Animatable.
+    const actor = animatable.get_actor();
+
     // Copy Clutter's behavior for implicit animations, see
     // should_skip_implicit_transition()
-    if (animatable instanceof Clutter.Actor && !animatable.mapped)
+    if (!actor?.mapped)
         duration = 0;
 
     const prepare = () => {